package com.llb666.e.shop.infrastructure.mapper;

import com.llb666.e.shop.api.vo.CategoryVo;
import com.llb666.e.shop.api.vo.NewItemsVo;
import com.llb666.e.shop.infracore.mapper.MyMapper;
import com.llb666.e.shop.infrastructure.po.CategoryPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface CategoryMapper extends MyMapper<CategoryPo> {
    /**
     *  根据父节点查询类目列表
     * @param rootCatId 父节点
     * @return 类目列表
     */
    public List<CategoryVo> getSubCatList(@Param("rootCatId") Integer rootCatId);

    /**
     * 查询6个商品懒加载
     * @param map map
     * @return List<NewItemsVO>
     */
    public List<NewItemsVo> getSixNewItemsLazy(@Param("paramsMap") Map<String, Object> map);
}